package model;

import java.sql.Timestamp;

/**
 * VReview entity. @author MyEclipse Persistence Tools
 */

public class VReview implements java.io.Serializable {

	private Integer reviewid;
	private Integer novelid;
	private Integer chapterid;
	private String userid;
	private String nickname;
	private String reviewcontent;
	private String ipaddr;
	private Timestamp createtime;
	private String reply;

	// Constructors

	/** default constructor */
	public VReview() {
	}

	/** minimal constructor */
	public VReview(Integer reviewid, Integer novelid, Integer chapterid,
			String userid, String nickname, String reviewcontent) {
		this.reviewid = reviewid;
		this.novelid = novelid;
		this.chapterid = chapterid;
		this.userid = userid;
		this.nickname = nickname;
		this.reviewcontent = reviewcontent;
	}

	/** full constructor */
	public VReview(Integer reviewid, Integer novelid, Integer chapterid,
			String userid, String nickname, String reviewcontent,
			String ipaddr, Timestamp createtime, String reply) {
		this.reviewid = reviewid;
		this.novelid = novelid;
		this.chapterid = chapterid;
		this.userid = userid;
		this.nickname = nickname;
		this.reviewcontent = reviewcontent;
		this.ipaddr = ipaddr;
		this.createtime = createtime;
		this.reply = reply;
	}

	// Property accessors

	public Integer getReviewid() {
		return this.reviewid;
	}

	public void setReviewid(Integer reviewid) {
		this.reviewid = reviewid;
	}

	public Integer getNovelid() {
		return this.novelid;
	}

	public void setNovelid(Integer novelid) {
		this.novelid = novelid;
	}

	public Integer getChapterid() {
		return this.chapterid;
	}

	public void setChapterid(Integer chapterid) {
		this.chapterid = chapterid;
	}

	public String getUserid() {
		return this.userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getNickname() {
		return this.nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getReviewcontent() {
		return this.reviewcontent;
	}

	public void setReviewcontent(String reviewcontent) {
		this.reviewcontent = reviewcontent;
	}

	public String getIpaddr() {
		return this.ipaddr;
	}

	public void setIpaddr(String ipaddr) {
		this.ipaddr = ipaddr;
	}

	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

	public String getReply() {
		return this.reply;
	}

	public void setReply(String reply) {
		this.reply = reply;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof VReview))
			return false;
		VReview castOther = (VReview) other;

		return ((this.getReviewid() == castOther.getReviewid()) || (this
				.getReviewid() != null && castOther.getReviewid() != null && this
				.getReviewid().equals(castOther.getReviewid())))
				&& ((this.getNovelid() == castOther.getNovelid()) || (this
						.getNovelid() != null && castOther.getNovelid() != null && this
						.getNovelid().equals(castOther.getNovelid())))
				&& ((this.getChapterid() == castOther.getChapterid()) || (this
						.getChapterid() != null
						&& castOther.getChapterid() != null && this
						.getChapterid().equals(castOther.getChapterid())))
				&& ((this.getUserid() == castOther.getUserid()) || (this
						.getUserid() != null && castOther.getUserid() != null && this
						.getUserid().equals(castOther.getUserid())))
				&& ((this.getNickname() == castOther.getNickname()) || (this
						.getNickname() != null
						&& castOther.getNickname() != null && this
						.getNickname().equals(castOther.getNickname())))
				&& ((this.getReviewcontent() == castOther.getReviewcontent()) || (this
						.getReviewcontent() != null
						&& castOther.getReviewcontent() != null && this
						.getReviewcontent()
						.equals(castOther.getReviewcontent())))
				&& ((this.getIpaddr() == castOther.getIpaddr()) || (this
						.getIpaddr() != null && castOther.getIpaddr() != null && this
						.getIpaddr().equals(castOther.getIpaddr())))
				&& ((this.getCreatetime() == castOther.getCreatetime()) || (this
						.getCreatetime() != null
						&& castOther.getCreatetime() != null && this
						.getCreatetime().equals(castOther.getCreatetime())))
				&& ((this.getReply() == castOther.getReply()) || (this
						.getReply() != null && castOther.getReply() != null && this
						.getReply().equals(castOther.getReply())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getReviewid() == null ? 0 : this.getReviewid().hashCode());
		result = 37 * result
				+ (getNovelid() == null ? 0 : this.getNovelid().hashCode());
		result = 37 * result
				+ (getChapterid() == null ? 0 : this.getChapterid().hashCode());
		result = 37 * result
				+ (getUserid() == null ? 0 : this.getUserid().hashCode());
		result = 37 * result
				+ (getNickname() == null ? 0 : this.getNickname().hashCode());
		result = 37
				* result
				+ (getReviewcontent() == null ? 0 : this.getReviewcontent()
						.hashCode());
		result = 37 * result
				+ (getIpaddr() == null ? 0 : this.getIpaddr().hashCode());
		result = 37
				* result
				+ (getCreatetime() == null ? 0 : this.getCreatetime()
						.hashCode());
		result = 37 * result
				+ (getReply() == null ? 0 : this.getReply().hashCode());
		return result;
	}

}